<div>
<a href="/admin/new-user/">创建新用户</a>
</div>
<div class="table-league-title" >
    <div class="float-left league-id">用户id</div>
    <div class="float-left league-name">用户名</div>

    <div class="float-left league-action">操作</div>

</div>

<div class="table-league">
	
<?php foreach($this->users as $user){?>
	  <div class="float-left league-id"><?php echo (int)$user->id?></div>
    <div class="float-left league-name"><?php echo $user->username?></div>

    <div class="float-left league-action">

        	<a href="/admin/update-user-password/user-id/<?php echo $user->id?>/">修改密码</a>  
        	<?php if($user->status=='active'){?>      	      
        		<a href="/admin/disactive-user/user-id/<?php echo $user->id?>/" 
        		onclick="return confirm('确认禁用此用户 : <?php echo $user->username;?> ？');">禁用</a>
        	<?php }else{?>
        		<a href="/admin/active-user/user-id/<?php echo $user->id?>/" 
        		onclick="return confirm('确认激活此用户 : <?php echo $user->username;?> ？');">激活</a>
        	<?php }?>

        </div>
<?php }?>
</div>